<?php
class system_setting_concept extends system_concept_abstract {
	
	public function init() {
		$this->setRowClass('system_setting_row');
		$this->setModel('system_setting_model', 'setting');
		$this->setModelCols('setting', array('module', 'name', 'value', 'description', 'is_system'));
	}
	
	public static function queryCacheList($module) {
		$module = strtoupper($module);
		$result = array();
		$tablePrefix = system_db_table::getTablePrefix();
		foreach(system_db::getAdapter()->fetchAll("SELECT `name`, `value` FROM `{$tablePrefix}system_setting` WHERE `module` = '$module'") AS $row) {
			$result[$row['name']] = $row['value'];
		}
		return $result;
	}

}